package com.rt.system.service.impl;

import java.util.List;
import com.rt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rt.system.mapper.ApplyInfoMapper;
import com.rt.system.domain.ApplyInfo;
import com.rt.system.service.IApplyInfoService;

/**
 * 报名管理Service业务层处理
 * 
 * @author Yg
 * @date 2024-08-14
 */
@Service
public class ApplyInfoServiceImpl implements IApplyInfoService 
{
    @Autowired
    private ApplyInfoMapper applyInfoMapper;

    /**
     * 查询报名管理
     * 
     * @param id 报名管理主键
     * @return 报名管理
     */
    @Override
    public ApplyInfo selectApplyInfoById(Long id)
    {
        return applyInfoMapper.selectApplyInfoById(id);
    }

    /**
     * 查询报名管理列表
     * 
     * @param applyInfo 报名管理
     * @return 报名管理
     */
    @Override
    public List<ApplyInfo> selectApplyInfoList(ApplyInfo applyInfo)
    {
        return applyInfoMapper.selectApplyInfoList(applyInfo);
    }

    /**
     * 新增报名管理
     * 
     * @param applyInfo 报名管理
     * @return 结果
     */
    @Override
    public int insertApplyInfo(ApplyInfo applyInfo)
    {
        applyInfo.setCreateTime(DateUtils.getNowDate());
        return applyInfoMapper.insertApplyInfo(applyInfo);
    }

    /**
     * 修改报名管理
     * 
     * @param applyInfo 报名管理
     * @return 结果
     */
    @Override
    public int updateApplyInfo(ApplyInfo applyInfo)
    {
        applyInfo.setUpdateTime(DateUtils.getNowDate());
        return applyInfoMapper.updateApplyInfo(applyInfo);
    }

    /**
     * 批量删除报名管理
     * 
     * @param ids 需要删除的报名管理主键
     * @return 结果
     */
    @Override
    public int deleteApplyInfoByIds(Long[] ids)
    {
        return applyInfoMapper.deleteApplyInfoByIds(ids);
    }

    /**
     * 删除报名管理信息
     * 
     * @param id 报名管理主键
     * @return 结果
     */
    @Override
    public int deleteApplyInfoById(Long id)
    {
        return applyInfoMapper.deleteApplyInfoById(id);
    }
}
